#include "thread.hpp"
#include <sys/unistd.h>
using namespace threadModlue;
class Test
{
public:
    int x = 10;
    std::string name = "CLASS";
};
void Count(Test c)
{
    while (c.x--)
    {
        std::cout << "TEST!"<<c.name << std::endl;
        sleep(1);
    }
}

int main()
{
    Test cnt;
    Thread<Test> t1(Count, cnt);
    t1.Start();
    t1.Join();



    // t1.Start();
    // t1.Detach();
    // sleep(5);
    // t1.stop();
    // sleep(3);
    // t1.Join();
    // return 0;
}